import {RoutesInterface} from "@/interface/routesInterface";
import {Router} from "express";
import ClassController from "@/controllers/ClassController";

export default class classRoutes implements RoutesInterface {
    path: string = '/classes';
    router: Router = Router();
    ClassController:ClassController;
    constructor() {
        this.ClassController=new ClassController()
        this.initClasssRoute()
    }
    private initClasssRoute(){

        /**
         * 新增班级
         */
        this.router.post(`${this.path}`,this.ClassController.createClass)
        /**
         * 删除班级
         */
        this.router.delete(`${this.path}`,this.ClassController.deleteClass)
        /**
         * 更新班级
         */
        this.router.put(`${this.path}`,this.ClassController.updateClass)
        /**
         * 查找班级
         */
        this.router.get(this.path,this.ClassController.getClass);


    }

}